package com.lhx.arrray;

import java.util.ArrayList;
import java.util.List;

/*1389. 按既定顺序创建目标数组*/
public class array1389 {


    public static void main(String[] args) {
        List list = new ArrayList();
        list.add("xiao1");
        list.add("xiao2");
        list.add("xiao3");
        list.add(1,"xiao4");
        System.out.println(list);
    }
    /*
    public static void main(String[] args) {
        int[] nums = {0,1,2,3,4};
        int[] index = {0,1,2,2,1};

        List<Integer> list = new ArrayList<Integer>();
        for (int i = 0; i < nums.length; ++i) {
            list.add(index[i], nums[i]);
        }
        //System.out.println(list.get(1));
        //int[] ret = new int[nums.length];

        //for (int i = 0; i < nums.length; ++i) {
       //     System.out.println(list.get(i));
       // }

    }
*/
}
